Navigation Services allows you to display a standard alert box for saving changes or quitting an application, and to customize this alert box for other uses.
Note: You are strongly encouraged to make all Navigation Services dialog boxes movable by providing updates via an event-handling function. For more information, see Handling Events.
To display a standard Save Changes alert box, your application passes its name and the document title to the function , which displays the alert box shown in Figure 2-11.
After the user closes the Save Changes alert box, Navigation Services tells your application which button the user clicked by returning one of the
NavAskSaveChangesResult
constants, as described in .
You can display a customized Save Changes alert box by using the function . Figure 2-12 shows an example of a customized Save Changes alert box.
You must provide the message to be displayed in a custom Save Changes alert box by specifying a string in the message field of a structure.
If your application has a Revert to Saved or similar item in its File menu, Navigation Services provides an alert box to handle this situation, as shown in Figure 2-13. This alert box is created by calling the function .
After the user closes the alert box, Navigation Services tells your application which button the user clicked by returning one of the
NavAskDiscardChangesResult
constants, as described in .